import service from '../utils/request-2.js'

// 添加角色信息
export const  mockRoleMan=(RoleName,RoleDesc)=>{
    return service({
        method:'post',
        url:'/api/v1/admin/permissions',
        data:{
            RoleName,
            RoleDesc
        }
    })
}

//修改角色信息
 export const mockPutRoleMan=(RoleId,RoleName,RoleDesc)=>{
    return service({
        method:'put',
        url:`/api/v1/admin/permissions/${RoleId}`,
        data:{
            RoleId,
            RoleName,
            RoleDesc
        },
        // params:{id}
    })
 }
//获取角色列表信息

export const mockRoleManList=()=>{
    return service({
        url:'/mock/roleManList',
        method:'get',

    })
}

//删除产品

export const mockDeleteRoleMan=(RoleId)=>{
    return service({
        method:'delete',
        url:`/api/v1/admin/permissions/${RoleId}`,
        data:{
            RoleId
        }
    })
}


//添加权限信息
export const mockRoleManInfo=(RoleId,NodeId,RoleRightId)=>{
    return service({
        method:'post',
        url:`/api/v1/admin/permissions/${RoleId}`,
        data:{
            RoleId,
            RoleRightId,
            NodeId
        }
    })
}